<template>
  <div class="common-box" :style="styleCom">
    <div class="common-header">
      <div class="common-title">{{ title }}</div>
    </div>
    <div class="common-content">
      <slot></slot>
    </div>
  </div>
</template>

<script setup>
import { computed } from "vue";
const props = defineProps({
  title: {
    type: String,
    default: "",
  },
  width: {
    type: String,
    default: "100%",
  },
  height: {
    type: String,
    default: "100%",
  },
});
const styleCom = computed(() => {
  return {
    width: props.width,
    height: props.height,
  };
});
</script>

<style scoped lang="less">
.common-box {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: rgba(17, 12, 46, 0.1) 0px 10px 30px -5px;
  transition: all 0.3s ease;
  padding: 24px;

  &:hover {
    box-shadow: rgba(17, 12, 46, 0.15) 0px 15px 35px -5px;
  }

  .common-header {
    width: 100%;
    height: 38px;
    .common-title {
      font-size: 24px;
      font-weight: 600;
      color: #333;
      float: left;
    }
  }
  .common-content {
    margin-top: 10px;
  }
}
</style>
